package com.jd.idea.plugin.action;

import com.intellij.notification.Notification;
import com.intellij.notification.NotificationDisplayType;
import com.intellij.notification.NotificationGroup;
import com.intellij.notification.Notifications;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.ui.MessageType;
import com.jd.idea.plugin.demo.JSwingExample;

import javax.swing.*;

public class Hello2Action extends AnAction {

    @Override
    public void actionPerformed(AnActionEvent e) {
        //第三个参数是否记录event log
        NotificationGroup notificationGroup = new NotificationGroup("Hello_id", NotificationDisplayType.BALLOON, false);
        Notification notification = notificationGroup.createNotification("点击测试", MessageType.INFO);
        Notifications.Bus.notify(notification);

        JSwingExample.showFrame();
    }
}
